package com.uow.algdemo.material;

public class Node
{
	/**
     * Value of node.
     */
	public int value;
	/**
     * Level of node.
     */
	public int level;
	/**
     * Index of node.
     */
	public int index;
	/**
     * Index of parent node.
     */
	public int parent;
	/**
     * Position of node in animation.
     */
	public double position;
	/**
     * Left child node.
     */
	public Node leftChild;
	/**
     * Right child node.
     */
	public Node rightChild;

    /**
     * @param value Value of node.
     * @param i Index of node in tree.
     * @param level Level of current parent node.
     * @param parent Index of parent in tree.
     * @param position Position of node in animation.
     */
   	public Node(int value, int index, int level, int parent, double position)
	{
		this.position = position;
		this.level = level;
		this.index = index;
	    this.value = value;
	    this.parent = parent;
	    leftChild = null;
	    rightChild = null;
	}
}
